package com.cdd.permission.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.cdd.permission.mapper.UserMapper;
import com.cdd.permission.service.UserService;
import com.common.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.function.UnaryOperator;

/**
 * TODO
 *
 * @author lenovo
 * @version 1.0
 * @since 2022-08-31  20:38:36
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public User selectUserName(String username) {
        QueryWrapper<User> wrapper=new QueryWrapper();
        wrapper.eq("username",username);
        wrapper.eq("is_deleted",0);
        wrapper.eq("state",0);
        User user = userMapper.selectOne(wrapper);
        return user;
    }
}
